package com.yan.demo.method;

public class MethodTest15 {
    public static void main(String[] args) {
        double money = getDiscount(202.0);
        System.out.println("最总价为:" + money);
    }

    // 定义一个方法求出打折后的总价
    public static double getDiscount(double money) {
        if (money < 100) {
            System.out.println("不打折");
        } else if(money >= 100 && money <= 199) {
            money -= money * 0.095;
        } else {
            money -= money * 0.085;
        }

        return money;
    }
}
